^1640740802640
@
sname
WebExample
slabel
WebExample
sdescriptors
xworker.web.ControlSet
sid
WebExample
  @/@LoginPage
  sname
  LoginPage
  sdescriptors
  xworker.web.ControlSet/@SimpleControl
  sid
  LoginPage
    @/@LoginPage/@actions
    sname
    actions
    sdescriptors
    xworker.web.controls.SimpleControl/@actions
    sid
    actions
      @/@LoginPage/@actions/@doAction
      sname
      doAction
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
if(requestBean.command == "login"){
    def userLogin = ["name":requestBean.name, "password":requestBean.password];
    session.setAttribute("userLogin", userLogin);
}else if(requestBean.command == "logout"){
    session.setAttribute("userLogin", null);
}

userLogin = session.getAttribute("userLogin");
if(userLogin == null){
    return "login";
}else{
    return "logout";
}
#$@text#$@
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sid
      doAction
    @/@LoginPage/@loginPage
    sname
    loginPage
    sbelongToHtml
    true
    stitle
    Login
    sstyle
    default
    shasHead
    false
    shasBottom
    false
    sotherHeads
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    sdescriptors
    xworker.web.controls.SimpleControl/@view
    sid
    loginPage
      @/@LoginPage/@loginPage/@aform
      sname
      aform
      smethod
      POST
      saction
      do?sc=xworker.example.tutorial.lession 2.WebExample/@LoginPage
      sdescriptors
      xworker.html.base.container.childs/@form
        @/@LoginPage/@loginPage/@aform/@command
        sname
        command
        svalue
        login
        sdescriptors
        xworker.html.base.container.childs/@hidden
        sid
        command
        @/@LoginPage/@loginPage/@aform/@FormLayout
        sname
        FormLayout
        srowspan
        1
        scolspan
        1
        scols
        2
        sisFieldSet
        false
        shaveLabel
        true
        shaveTitle
        true
        sshowTitle
        true
        slayout
        formLayout
        sscrollable
        false
        scellpadding
        0
        scellspacing
        0
        sborder
        0
        sdescriptors
        xworker.html.base.container.childs/@FormLayout
        sid
        FormLayout
          @/@LoginPage/@loginPage/@aform/@FormLayout/@name
          sname
          name
          slabel
          Name:
          stype
          string
          ssize
          16
          sdisabled
          false
          sdescriptors
          xworker.html.base.container.childs/@textField
          sid
          name
          @/@LoginPage/@loginPage/@aform/@FormLayout/@password
          sname
          password
          slabel
          Password:
          stype
          string
          ssize
          16
          sdisabled
          false
          sdescriptors
          xworker.html.base.container.childs/@password
          sid
          password
          @/@LoginPage/@loginPage/@aform/@FormLayout/@cell
          sname
          cell
          scolspan
          2
          srowspan
          1
          shAlign
          right
          sshowTitle
          false
          snowrap
          true
          sdescriptors
          xworker.html.base.container.FormLayout/@cell
          sid
          cell
            @/@LoginPage/@loginPage/@aform/@FormLayout/@cell/@submitButton
            sname
            submitButton
            svalue
            Submit
            stype
            submit
            sdisabled
            false
            sdescriptors
            xworker.html.base.container.childs/@button
            sid
            submitButton
    @/@LoginPage/@logoutPage
    sname
    logoutPage
    sbelongToHtml
    true
    sstyle
    default
    shasHead
    false
    shasBottom
    false
    sotherHeads
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    sdescriptors
    xworker.web.controls.SimpleControl/@view
    sid
    logoutPage
      @/@LoginPage/@logoutPage/@code
      sname
      code
      Scode
#$@text#$@
Name:${userLogin.name?if_exists}<br/>
Password:${userLogin.password?if_exists}<br/>
<a href="do?sc=xworker.example.tutorial.lession 2.WebExample/@LoginPage&command=logout">Logout</a>
#$@text#$@
      sdescriptors
      xworker.html.base.container.childs/@code
      sid
      code
    @/@LoginPage/@login
    sname
    login
    stype
    form
    scontentType
    text/html;charset=UTF-8
    svalue
    xworker.example.tutorial.lession 2.WebExample/@LoginPage/@loginPage
    sdescriptors
    xworker.web.controls.SimpleControl/@result
    sid
    login
    @/@LoginPage/@logout
    sname
    logout
    stype
    form
    scontentType
    text/html;charset=UTF-8
    svalue
    xworker.example.tutorial.lession 2.WebExample/@LoginPage/@logoutPage
    sdescriptors
    xworker.web.controls.SimpleControl/@result
    sid
    logout
